﻿/*
 * 由SharpDevelop创建。
 * 用户： Administrator
 * 日期: 2024/5/31
 * 时间: 16:27
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;
using System.Net;
using System.IO;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace moyu
{
	/// <summary>
	/// Description of MainForm.
	/// </summary>
	public partial class MainForm : Form
	{
		public MainForm()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			 WebClient webClient = new WebClient();
			ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.SystemDefault | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;
			  Byte[] imgData = webClient.DownloadData("https://api.vvhan.com/api/moyu");
			  Stream ms = new MemoryStream(imgData);
			  ms.Position = 0;
			  Image img = Image.FromStream(ms);
			  
			  pictureBox1.Image=img;
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
	}
}
